const myPromise = () => Promise.resolve("I have resolved!");

function firstFunction() {
    myPromise().then((res) => console.log(res));
    console.log("second");
}

async function secondFunction() {
    console.log(await myPromise());
    console.log("second");
}

firstFunction();
secondFunction();
/*
? second
? I have resolved!
? I have resolved!
? second
 */
